package com.xlh.param.course;

import com.xlh.enums.ResourcesTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 修改资源权限参数
 * <p>
 * Created by lx on 2019/4/11.
 */
@Data
public class UpdateResourceAuthorityParam {

    @ApiModelProperty(value = "章节id")
    private Long chapterId;

    /**
     * @see ResourcesTypeEnum
     */
    @ApiModelProperty(value = "资源类型")
    @NotNull(message = "资源类型不能为空")
    private Integer resourcesType;

    @ApiModelProperty(value = "权限")
    private List<PermissionParam> permission;

    @NotEmpty(message = "是否设置全部资源")
    private Boolean allResources = false;

    @ApiModelProperty(value = "下载/禁止下载 true：允许下载 false：禁止下载")
    private Boolean download = null;

    @ApiModelProperty(value = "显示/隐藏 true：显示 false：隐藏")
    private Boolean show = null;

}
